$(document).ready(function(){
	$("#list_photo").dragsort({ 
		dragSelector: "img.photolist", 
		dragBetween: true,		
		dragEnd: saveOrder, 
		placeHolderTemplate: "<li class='placeHolder'><div></div></li>"});

    function saveOrder() {
         var serialStr = "";
         $("#list_photo li").each(function(i, elm) { serialStr += (i > 0 ? "|" : "") + $(elm).attr('rel'); });
         $("input[name=list1SortOrder]").val(serialStr);
    };
});